{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "metadata": {}
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2024-05-23 21:49:58.069307: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
      "To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "\n",
    "import tensorflow as tf\n",
    "\n",
    "import cProfile"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "metadata": {}
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 在 Tensorflow 2.0 中，默认启用 Eager Execution。\n",
    "\n",
    "tf.executing_eagerly()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "metadata": {}
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello, [[4.]]\n"
     ]
    }
   ],
   "source": [
    "# 计算\n",
    "\n",
    "x = [[2.]]\n",
    "m = tf.matmul(x,x)\n",
    "print(\"hello, {}\".format(m))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "metadata": {}
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tf.Tensor(\n",
      "[[1 2]\n",
      " [3 4]], shape=(2, 2), dtype=int32)\n"
     ]
    }
   ],
   "source": [
    "\"\"\"\n",
    "Eager Execution 可以很好地配合 NumPy 使用。NumPy 运算接受 tf.Tensor 参数。TensorFlow tf.math 运算会将 Python 对象和 NumPy 数组转换为 tf.Tensor 对象。tf.Tensor.numpy 方法会以 NumPy ndarray 的形式返回该对象的值。\n",
    "\n",
    "\"\"\"\n",
    "\n",
    "a = tf.constant([[1,2], [3,4]])\n",
    "\n",
    "print(a)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "metadata": {}
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tf.Tensor(\n",
      "[[2 3]\n",
      " [4 5]], shape=(2, 2), dtype=int32)\n"
     ]
    }
   ],
   "source": [
    "b = tf.add(a, 1)\n",
    "\n",
    "print(b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "metadata": {}
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tf.Tensor(\n",
      "[[ 2  6]\n",
      " [12 20]], shape=(2, 2), dtype=int32)\n"
     ]
    }
   ],
   "source": [
    "print(a * b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "metadata": {}
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[ 2  6]\n",
      " [12 20]]\n"
     ]
    }
   ],
   "source": [
    "# Use NumPy values\n",
    "\n",
    "import numpy as np\n",
    "\n",
    "c = np.multiply(a, b)\n",
    "\n",
    "print(c)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "metadata": {}
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[1 2]\n",
      " [3 4]]\n"
     ]
    }
   ],
   "source": [
    "# Obtain numpy value from a tensor\n",
    "\n",
    "print(a.numpy())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "metadata": {}
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tf.Tensor(6.0, shape=(), dtype=float32)\n"
     ]
    }
   ],
   "source": [
    "x = tf.Variable(2.)\n",
    "y = tf.Variable(3.)\n",
    "\n",
    "with tf.GradientTape() as tape:\n",
    "  z = y * y\n",
    "print(tape.gradient(z, y))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "metadata": {}
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Matplotlib is building the font cache; this may take a moment.\n"
     ]
    }
   ],
   "source": [
    "# 训练循环\n",
    "\n",
    "import tensorflow as tf\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "colors = plt.rcParams['axes.prop_cycle'].by_key()['color']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "metadata": {}
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "第四次：[-2.768731   -4.2659945  -1.006658   -0.23821104 -1.0599018  -2.2446194\n",
      " -1.6071575   0.5444038   1.4386811   2.7052007   3.4836144   3.9099004\n",
      "  4.975539    4.039712    7.3513584   5.1171637   7.2583847   8.545237\n",
      "  9.765421  ]\n"
     ]
    }
   ],
   "source": [
    "# The actual line\n",
    "TRUE_W = 3.0\n",
    "TRUE_B = 2.0\n",
    "\n",
    "NUM_EXAMPLES = 19\n",
    "\n",
    "# A vector of random x values\n",
    "x = tf.linspace(-2,2, NUM_EXAMPLES)\n",
    "# print(f\"第一次：{x}\")\n",
    "x = tf.cast(x, tf.float32)\n",
    "# print(f\"第二次：{x}\")\n",
    "def f(x):\n",
    "  return x * TRUE_W + TRUE_B\n",
    "\n",
    "# Generate some noise\n",
    "noise = tf.random.normal(shape=[NUM_EXAMPLES])\n",
    "# print(f\"第三次次：{noise}\")\n",
    "# Calculate y\n",
    "y = f(x) + noise\n",
    "print(f\"第四次：{y}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "metadata": {}
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiIAAAGdCAYAAAAvwBgXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy80BEi2AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAnI0lEQVR4nO3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hO3funO6++24tW7YsrP3mzZunpqam0PLqq6+6VOGVGUj7nn76af30pz/Vhg0btHfvXo0cOVJz587V559/7mKlA7Nw4UIdPXpU27dv15tvvql3331X999//2X3W7p0aa/z9/TTT0eg2svbsmWLHnnkEa1evVoHDhzQjTfeqLlz5+rTTz+96PZ79uzRvffeq/vuu08HDx7UggULtGDBAh05ciTClfdPuO2Tzv965ZfP1ccffxzBisPT1tamG2+8UevXr+/X9nV1dbrzzjs1Z84cHTp0SCtWrNDf/d3f6Z133nG50oELt409jh8/3us8jh071qUKr8yuXbtUVlam9957T9u3b9cXX3yh22+/XW1tbZfcx8r30AxRTz/9tMnLy7vk+2fPnjXDhw83r7/+emjdBx98YCSZ6urqSJQ4YBs3bjQ+n69f2y5atMjMnz/f1XoGW3/b193dbTIyMsxPfvKT0LqzZ8+apKQk8+qrr7pYYfh+//vfG0mmpqYmtO6tt94yjuOYkydPXnK/W2+91Tz88MMRqDB8t9xyiykrKwu97urqMllZWaaiouKi23/72982d955Z69106dPNw888ICrdQ5UuO0L53sZbSSZrVu39rnNo48+am644YZe60pLS83cuXNdrGzw9KeNv/nNb4wk86c//SkiNQ22Tz/91Egyu3btuuQ2Nr6HQ6JH5GICgYDGjBlzyff379+vL774QsXFxaF1119/vXJyclRdXR2JEiNm586dGjt2rCZPnqxly5bpzJkztksaFHV1dWpubu51Dn0+n6ZPnx5157C6ulqjR4/WtGnTQuuKi4uVkJCgvXv39rnvL37xC6Wmpio/P1/l5eVqb293u9zLOnfunPbv39/rb5+QkKDi4uJL/u2rq6t7bS9Jc+fOjbpzJQ2sfZL02Wefafz48crOztb8+fN19OjRSJQbEbF0/q7UlClTlJmZqb/8y7/Ub3/7W9vl9FsgEJCkPq99Ns5jVD/0zi21tbV6/vnntW7duktu09zcrMTExAvmIqSnp0fteOBAzJs3TyUlJcrLy9OJEye0atUq3XHHHaqurpbH47Fd3hXpOU/p6em91kfjOWxubr6ge3fYsGEaM2ZMn7V+5zvf0fjx45WVlaXf/e53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EMQAQAA1hBEAACANf8PuGuq/d1UZa8AAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Plot all the data\n",
    "plt.plot(x, y, '.')\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
